<?php	

	function ValidaUsuario($pageIn,$pageOut){
		echo "informaciion";
		if(isset($_SESSION['dtoUser'])){
			if(isset($_SESSION['dtoPartner'])){	
			 	require_once("../../../../../../../wamp/www/VideoClub/class/core/include_dao.php");	
				$dtoPartner = new Partner();
				$dtoPartner = unserialize($_SESSION['dtoPartner']);				
				if($dtoPartner->fKTargetTypePerson == 1)
				{
					header("Location: ./$pageIn?err=42");
				}
			}
		}
		else
			header("Location: ./$pageIn?err=14");
	}	
	
	function EnviarIndex(){
		header("Location: ./index.php");
	}
	
		
	if(isset($_GET["pageIn"]) and isset($_GET["pageOut"])){
		if (($_GET["pageIn"] != '') and ($_GET["pageOut"] != '')){			
			// Validacion de permisos para ir a la paguina
			ValidaUsuario($_GET["pageIn"],$_GET["pageOut"]);
		}
		else 			
			EnviarIndex();
	}
	else
		EnviarIndex();
	
	
	
?>